﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Evoucher.Business.Models;
using System.Web.Services;

public partial class jquery : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }

    [WebMethod]
    public static long GetPriceByVoucherTypeId(int id)
    {
        IVoucherRepository repo = new VoucherRepository();
        VoucherType vt = repo.GetVoucherTypeById(id);
        return vt.Price;
    }

    [WebMethod]
    public static bool GetActivePaymentGateway(int id)
    {
        IVoucherRepository repo = new VoucherRepository();
        PaymentGateway pg = repo.GetGatewayInfo(id);
        return pg.Active.Value;
    }
}